When you click a material icon from the Materials library,you assign that material to any selected object (objects). Any material that you have previously assigned to the selected object (objects) will automatically be replaced.
You can, otherwise, obtain a partial merging of two materials if you click a material icon while holding the Ctrl key down: any shader of the clicked material that belongs to a class not included in the old material will be added as a new component. This way, you will obtain a third material with some components from the old material and others from the clicked one.
An example will probably help you understand this concept: A sphere has a material with one component only: a "plain" color shader.
After selecting the sphere, we click another material from the Materials library while holding the Ctrl key down. If this second material has two components, a "marble" color shader and a "rough" displacement shader for instance, the resulting material will have the original "plain" color shader but enriched by the "rough" displacement shader.
See also: